<script>
import BaseChart from './BaseChart.vue';

export default {
  extends: BaseChart,
  name: 'RingChart',
  data() {
    return {
      series: [{
        type: 'pie'
      }],
    }
  },
  props: {
    radius: {
      type: Array,
      default() {
        return [50, 40]
      }
    },
    roseType: {
      type: String | Boolean,
      default: false,
      validator: function (value) {
        return [false, 'area', 'radius'].indexOf(value) !== -1
      }
    }
  },
  created() {
    this.series[0].radius = this.radius;
    this.series[0].roseType = this.roseType;
    this.setOption("series", this.series);
  }
}
</script>
